package testcase;

import junit.framework.TestCase;
import maincode.*;
public class UserInputControllerTest extends TestCase{
	
    /**
     * Tears down the test fixture.
     *
     * Called after every test case method.
     */
	public void tearDown() {}
		
	//Test case 1,2,3 - checkCurInput
	public void test1() {
		boolean result=userInputController.checkCurInput("JPY");
		assertEquals(result, true);
		
	}
	
	public void test2() {
		boolean result=userInputController.checkCurInput("H0K");
		assertEquals(result, false);
	}
	
	public void test3() {
		boolean result=userInputController.checkCurInput("-1");
		assertEquals(result, false); 
	}
	
	//Test case 4,5,6,7,8,9,10 - getCurIndex
	public void test4() {
		int result=userInputController.getCurIndex("CNY");
		assertEquals(result, 1);
	}
	public void test5() {
		int result=userInputController.getCurIndex("000Y");
		assertEquals(result, -1);
	}
	public void test6() {
		int result=userInputController.getCurIndex("JPY");
		assertEquals(result, 2);
	}
	public void test7() {
		int result=userInputController.getCurIndex("USD");
		assertEquals(result, 0);
	}
	public void test8() {
		int result=userInputController.getCurIndex("EUR");
		assertEquals(result, 3);
	}
	public void test9() {
		int result=userInputController.getCurIndex("AUD");
		assertEquals(result, 4);
	}
	public void test10() {
		int result=userInputController.getCurIndex("GBP");
		assertEquals(result, 5);
	}
	
	

}


